<!-- 查看团队成员信息 -->
<template>
  <a-modal
    :visible="viewModalVisible"
    title="查看人员信息"
    :footer="null"
    width="80%"
    @cancel="handleCancel">
    <a-descriptions title="基本信息" bordered>
      <!-- <a-descriptions-item label="邀请码">{{ mainInfo.pin }}</a-descriptions-item> -->
      <a-descriptions-item label="人员编号">{{ mainInfo.no }}</a-descriptions-item>
      <a-descriptions-item label="角色">{{ roleName }}</a-descriptions-item>
      <a-descriptions-item label="组织">{{ mainInfo.orgName }}</a-descriptions-item>
      <a-descriptions-item label="姓名">{{ sysAdmin.name }}</a-descriptions-item>
      <!-- <a-descriptions-item label="姓名">{{ mainInfo.type | enumValueByKey($const.APPLY_COST_TYPE) }}</a-descriptions-item> -->
      <a-descriptions-item label="手机">{{ sysAdmin.phone }}</a-descriptions-item>
      <a-descriptions-item label="邮箱">{{ sysAdmin.email }}</a-descriptions-item>
      <a-descriptions-item label="身份证">{{ sysAdmin.idCard }}</a-descriptions-item>
      <a-descriptions-item label="用户名">{{ sysAdmin.userName }}</a-descriptions-item>
      <a-descriptions-item label="账号">{{ sysAdmin.account }}</a-descriptions-item>
    </a-descriptions>
  </a-modal>
</template>

<script>
import { getMemberDetail } from '@/api/overview/member'
export default {
  props: {
    viewModalVisible: {
      type: Boolean,
      default: false
    }
  },
  data () {
    return {
      mainInfo: {},
      sysAdmin: {},
      roleName: {}
    }
  },
  created () {
  },
  methods: {
    getMemberDetail (val) {
      getMemberDetail({ id: val })
        .then(res => {
          this.mainInfo = res
          this.sysAdmin = res.sysAdmin
          this.roleName = res.roleName
          console.log(res, '请求的详情')
        })
        .catch(() => {})
    },
    // 点击取消对话框消失
    handleCancel () {
      this.$emit('closeViewModal')
    }
  }
}
</script>
<style scoped lang="scss">

</style>
